﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace TicketSeller
{

    [DataContract(Name="ticket")]
    [Serializable]
    public class Ticket
    {
        [DataMember]
        public string source { set; get; }

        [DataMember]
        public string destination { set; get; }

        [DataMember]
        public string date { set; get; }

        [DataMember]
        public string flightNo { set; get; }

        public override bool Equals(object obj)
        {
            Ticket ticket = (Ticket)obj;
            return source.Equals( ticket.source) &&
                destination.Equals( ticket.destination) &&
                date.Equals( ticket.date) && flightNo.Equals( ticket.flightNo);
        }

        [DataMember]
        public string airCarrier { get; set; }

        [DataMember]
        public string alliance { set; get; }
    }
}
